<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      lang="zh-CN"
      xmlns:th="http://www.thymeleaf.org"
      xmlns="http://www.w3.org/1999/xhtml" layout:decorate="~{layout/template}">
<head>
    <title>新增</title>
    <link rel="stylesheet" href="/css/system/user/add.css"/>
</head>
<body>
<div id="contentContainer" layout:fragment="content" class="contentContainer navItem" v-cloak>

<el-row>
    <el-col :span="12" :offset="6">
    <el-form :model="form" :rules="rules" ref="form" label-width="80px">
        <el-form-item label="用户名" prop="userName">
            <el-input v-model="form.userName"></el-input>
        </el-form-item>
        <el-form-item label="姓名" prop="realName">
            <el-input v-model="form.realName"></el-input>
        </el-form-item>
        <el-form-item label="密码" prop="password">
            <el-input type="password" v-model="form.password"></el-input>
        </el-form-item>
        <el-form-item label="状态" prop="userStatus">
            <el-switch on-text="启用" off-text="禁用" active-value="1" inactive-value="0" v-model="form.userStatus"></el-switch>
        </el-form-item>
        <el-form-item label="组织机构">
            <el-cascader
                    :show-all-levels="true"
                    v-model="form.orgIdList"
                    change-on-select
                    :options="options"
                    :props="props">
            </el-cascader>
        </el-form-item>
        <el-form-item label="角色">
            <el-checkbox-group v-model="form.userRoleList">
                <el-checkbox th:each="role:${roleList}" th:label="${role}" name="role"></el-checkbox>
            </el-checkbox-group>
        </el-form-item>
        <el-form-item>
            <el-button type="primary" @click="submitForm('form')">立即创建</el-button>
            <el-button @click="resetForm('form')">重置</el-button>
        </el-form-item>
    </el-form>
    </el-col>
</el-row>

</div>

<th:block layout:fragment="staticFile">
<script src="/js/system/user/add.js"></script>
</th:block>

</body>
</html>